import { message } from "ant-design-vue";
import { noop } from "./warning.ts";

export function showMessage(e: any) {
  message.error(e?.message ?? e?.toString() ?? "error").then(noop);
}

export function showMessageAndPrint(e: any) {
  console.error(e);
  showMessage(e);
}
